/**
 * 测试Salesforce REST功能
 */
@RestResource(urlMapping = '/student/*')
global with sharing class StudentRestController {


    @HttpGet
    global static String test1() {
        CommonResponse cr = new CommonResponse();
        cr.code = 200;
        cr.message = '调用成功';
        cr.data = '测试数据';

        List<Object> list1 = new List<Object>();
        List<String> list2 = new List<String>();
        list1 = list2;

        return JSON.serialize(cr);
    }
    
    global class CommonResponse {
        public Integer code {set; get;}
        public String message {set; get;}
        public Object data {set; get;}
    }

}